package com.xxl.sso.server.mapper;

import com.xxl.sso.server.mapper.entity.LoginLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
 * description: 用户mapper
 * create by: YangLinWei
 * create time: 2020/2/21 3:21 下午
 */
@Mapper
public interface LoginLogMapper {

	@Insert("INSERT INTO `t_login_log` VALUES (null,#{username}, #{LOGIN_TIME}, #{LOCATION}, #{IP}, #{SYSTEM}, #{BROWSER};")
	int insert(LoginLog loginLog);

//	@Select("SELECT * FROM user WHERE MOBILE=#{mobile};")
//	UserDo existMobile(@Param("mobile") String mobile);
//
//	@Select("SELECT USER_ID AS USERID ,MOBILE AS MOBILE,EMAIL AS EMAIL,PASSWORD AS PASSWORD, USER_NAME AS USER_NAME ,SEX AS SEX ,AGE AS AGE ,CREATE_TIME AS CREATETIME,IS_AVALIBLE AS ISAVALIBLE,PIC_IMG AS PICIMG,QQ_OPENID AS QQOPENID,WX_OPENID AS WXOPENID "
//			+ "  FROM user  WHERE MOBILE=#{0} and password=#{1};")
//	UserDo login(@Param("mobile") String mobile, @Param("password") String password);
//
//	@Select("SELECT USER_ID AS USERID ,MOBILE AS MOBILE,EMAIL AS EMAIL,PASSWORD AS PASSWORD, USER_NAME AS userName ,SEX AS SEX ,AGE AS AGE ,CREATE_TIME AS CREATETIME,IS_AVALIBLE AS ISAVALIBLE,PIC_IMG AS PICIMG,QQ_OPENID AS QQOPENID,WX_OPENID AS WXOPENID"
//			+ " FROM user WHERE user_Id=#{userId}")
//	UserDo findByUserId(@Param("userId") Long userId);

}
